﻿/*
------------------------------------------
    Rodeo Game Engine
    Rodeo Renderer Module
    Texture.h - header file
    Copyright(c) Marcin Goryca 
------------------------------------------
*/
#ifndef RODEO_RENDERER_TEXTURE_H_
#define RODEO_RENDERER_TEXTURE_H_

#ifndef RODEO_IO_FILEDDS_H_
#include "io\filedds.h"
#endif

#ifndef RODEO_IO_FILETGA_H_
#include "io\filetga.h"
#endif

namespace rodeorenderer
{
class Texture
{
public:
    Texture(){}

    ~Texture()
    {
        reset();
    }

    virtual bool load(Image* image, const char* filename, rodeocore::ui& tid);
    //virtual void load(Image* image, std::string filename, ui numberOfTextures);
    virtual void release(Image* image);
    virtual void bind(Image* image, rodeocore::ui& tid);
    

    // This will clean up all generated textures 
    bool reset();

    rodeocore::ui texture_id_;
private:
    virtual void build(Image* image, rodeocore::ui& tid);

//==== MEMBERS ====//
    // Used for counting number of generated textures 
    static int s_texture_count_;
};
}    // end of rodeorenderer namespace
#endif    //RODEO_RENDERER_TEXTURE_H_